package y24.m3;

import java.util.ArrayList;
import java.util.List;

public class Test16 {
    static class TreeNode{
        private int val;
        private TreeNode left;
        private TreeNode right;
        public TreeNode(int val){
            this.val = val;
        }
    }
    static class Solution {
        public static List<Integer> inorderTraversal(TreeNode root) {
            List<Integer> ret = new ArrayList<>();
            if(root == null){
                return ret;
            }
            ret.addAll(inorderTraversal(root.left));
            ret.add(root.val);
            ret.addAll(inorderTraversal(root.right));
            return ret;
        }
    }
    public static TreeNode createTreeOne(){
        TreeNode A = new TreeNode(1);
        TreeNode B = new TreeNode(2);
        TreeNode C = new TreeNode(3);
        A.right = B;
        B.left = C;
        return A;
    }

    public static void main(String[] args) {
        TreeNode root = createTreeOne();
        System.out.println(Solution.inorderTraversal(root));
        int i = 6,j = 8,k = 10,m = 7;
        if (!(i>j | m > k++))
            k++;
        System.out.println(k);
    }
}
